package com.penngo.gui.dfdiff.view;

import com.penngo.gui.dfdiff.utils.AppInfo;
import com.penngo.gui.dfdiff.utils.ImgUtil;

import javax.swing.*;
import java.awt.*;

public abstract class BaseDialog extends JDialog {

    public BaseDialog(){
        this.setLayout(new GridBagLayout());
        initUI();
        setIconImage(ImgUtil.getIcon(AppInfo.Logo).getImage());
//        setSize((int)(ScreenUtil.getScreenWidth() * 0.5), (int)(ScreenUtil.getScreenHeight() * 0.5));
//        setSize(300, 200);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
        setModal(true);
        setVisible(true);
    }

    public abstract void initUI();
}
